package operations;

import books.Book;
import books.BookList;
import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

public class DisplayOperation implements IOperation{
    @Override
    public void work(BookList bookList){
        System.out.println("显示图书");
        System.out.println("****************************************");

        // 遍历数组打印book即可（book是一个返回图书信息的）
        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            Book book = bookList.getPos(i);
            System.out.println(book);
        }
    }
}
